package com.fcscs.cservice.client.main.configuration.inroomdining;

import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.widget.Label;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.VerticalPanel;
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
import com.extjs.gxt.ui.client.widget.form.FieldSet;
import com.extjs.gxt.ui.client.widget.form.TextArea;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.layout.ColumnData;
import com.extjs.gxt.ui.client.widget.layout.ColumnLayout;
import com.fcscs.core.gwt.common.CoreConstants;
import com.fcscs.core.gwt.common.ui.FcsFields.EasyClearCombobox;
import com.fcscs.cservice.client.common.CServiceConstants;
import com.fcscs.cservice.client.common.model.configuration.inroomdining.ChargeTypeConfigEnum;
import com.fcscs.cservice.client.common.model.configuration.inroomdining.ChargeTypeConfigModelData;
import com.fcscs.cservice.client.common.model.configuration.inroomdining.CommonReqeustConfigEnum;
import com.fcscs.cservice.client.common.model.configuration.inroomdining.CommonReqeustModelData;
import com.fcscs.cservice.client.common.model.configuration.inroomdining.CookOptionConfigEnum;
import com.fcscs.cservice.client.common.model.configuration.inroomdining.CookOptionConfigModelData;
import com.fcscs.cservice.client.common.model.configuration.inroomdining.ItemComboxConfigEnum;
import com.fcscs.cservice.client.common.model.configuration.inroomdining.ItemComboxModelData;
import com.fcscs.cservice.client.common.model.configuration.inroomdining.OutReserEnum;
import com.fcscs.cservice.client.common.model.configuration.inroomdining.OutReservedModelData;
import com.fcscs.cservice.client.common.model.configuration.restaurant.BookingConfirmTitleGWTEnum;
import com.fcscs.cservice.client.common.model.configuration.restaurant.BookingConfirmTitleGWTEnumModelData;
import com.fcscs.cservice.client.common.model.configuration.restaurant.BookingTimeoutGWTEnumModelData;
import com.fcscs.cservice.client.common.model.configuration.restaurant.ReservRckEnum;
import com.fcscs.cservice.client.common.model.configuration.restaurant.ReservRckModelData;
import com.fcscs.cservice.client.common.model.restaurants.BookingRequestMsgTempGWTEnumModelData;
import com.fcscs.cservice.client.common.model.restaurants.BookingRequestMsgTitleTempGWTEnumModelData;
import com.fcscs.share.gwt.common.ShareGWTConstants;

public class InRoomDiningAreaPanel extends VerticalPanel {
	public TextArea outReserArea;
	public TextArea bookingComfMessArea;
	public TextArea timeoutAlertMessArea;
	public TextArea bookingMessTempArea;
	public FieldSet fieldSet1;
	public FieldSet fieldSet2;
	public FieldSet fieldSet3;
	public FieldSet fieldSet4;
	public FieldSet fieldSet5;
	public FieldSet fieldSet6;
	public EasyClearCombobox<OutReservedModelData> outReserPeriodCombox;
	public ListStore<OutReservedModelData> outReserPeriodStore;
	public LayoutContainer expDeliveryTimeLc;
	public LayoutContainer bookingAreLc;
	public LayoutContainer timeoutLc;
	public EasyClearCombobox<BookingTimeoutGWTEnumModelData> timeoutCombox;
	public ListStore<BookingTimeoutGWTEnumModelData> timeoutStore;
	public LayoutContainer timeoutAreLc;
	public LayoutContainer bookingTempLc;
	public LayoutContainer outReserLc;
	public LayoutContainer bookingTileFieldLc;
	public EasyClearCombobox<BookingConfirmTitleGWTEnumModelData> bookingTitleMesCombox;
	public ListStore<BookingConfirmTitleGWTEnumModelData> bookingTitleMesStore;
	public LayoutContainer bookingTitleLc;
	public TextField<String> bookingTitleField;
	public LayoutContainer timeoutTitleMegLc;
	public EasyClearCombobox<BookingTimeoutGWTEnumModelData> timeoutTitleCombox;
	public ListStore<BookingTimeoutGWTEnumModelData> timeoutTitleStore;
	public LayoutContainer timeoutTitleLc;
	public TextField<String> timeoutTitleField;
	public LayoutContainer bookingTempTitleMesLc;
	public EasyClearCombobox<BookingRequestMsgTitleTempGWTEnumModelData> bookingReqTitleMesCombox;
	public ListStore<BookingRequestMsgTitleTempGWTEnumModelData> bookingReqTitleMesStore;
	public TextField<String> bookingReqTitleField;
	public LayoutContainer bookingReqTitleLc;
	public LayoutContainer inRoomReqAreaLc;
	public EasyClearCombobox<BookingRequestMsgTempGWTEnumModelData> bookingTempAreaCombox;
	public ListStore<BookingRequestMsgTempGWTEnumModelData> bookingTempAreaStore;
	public LayoutContainer expDeliveryLc;
	public  TextArea expDeliveryArea;
	public LayoutContainer nonValidDeliveryLc;
	public TextArea nonValidDeliveryArea;
	public LayoutContainer orderSentAckLc;
	public TextArea orderSentAckArea;
	public LayoutContainer inRoomRequestTimeoutTempLc;
	public TextArea inRoomRequestTimeoutTempArea;
	public LayoutContainer inRoomRequestTimeoutLc;
	public EasyClearCombobox<BookingRequestMsgTitleTempGWTEnumModelData> inRoomRequestTitleCombox;
	public ListStore<BookingRequestMsgTitleTempGWTEnumModelData> inRoomRequestTitleStore;
	public LayoutContainer inRoomRequestTimeoutTitleLc;
	public TextField<String> inRoomRequestTimeoutTitleField;
	public TextArea inRoomRequestTimeoutLcArea;
	public EasyClearCombobox<OutReservedModelData> expDeliveryTimeCombox;
	public LayoutContainer outReserPeriodLc;
	public LayoutContainer commonLc;
	public EasyClearCombobox<CommonReqeustModelData> commonCombox;
	public ListStore<CommonReqeustModelData> commonStore;
	public LayoutContainer itemLc;
	public EasyClearCombobox<ItemComboxModelData> itemCombox;
	public ListStore<ItemComboxModelData> itemStore;
	public LayoutContainer cookOptionLc;
	public EasyClearCombobox<CookOptionConfigModelData> cookOptionCombox;
	public ListStore<CookOptionConfigModelData> cookStore;
	
	public LayoutContainer chargeTypeLc;
	public EasyClearCombobox<ChargeTypeConfigModelData> chargeTypeCombox;
	public ListStore<ChargeTypeConfigModelData> chargeTypeStore;
	
	public LayoutContainer reserLc;
	public EasyClearCombobox<ReservRckModelData> reserCombox;
	public ListStore<ReservRckModelData> reserStore;

	public InRoomDiningAreaPanel() {
		outReserPropFieldSet();
		expectedDeliveryFieldSet();
		deliveryDateTimeForItemFieldSet();
		requestMessageFieldSet();
		requestTimeoutFieldSet();
	}

	public void outReserPropFieldSet() {
		fieldSet1 = new FieldSet();
		fieldSet1.setWidth(700);
		fieldSet1.setBorders(true);
		fieldSet1.setId("RestaurantConfigPanel_fieldSet1");
		fieldSet1.setHeading(CServiceConstants.CSERVICE_CONSTANTS.outReserPeriod()
				+ CoreConstants.REQURIED_FIELD_LABEL);
		add(fieldSet1);
		
		outReserPeriodLc = new LayoutContainer();
		outReserPeriodLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		outReserPeriodLc.setLayout(new ColumnLayout());
		fieldSet1.add(outReserPeriodLc);

		Label outReserPeriodLab = new Label(CServiceConstants.CSERVICE_CONSTANTS.messageField()
				+ CServiceConstants.FIELD_SEP);
		outReserPeriodLab.setId("RestaurantConfigPanel_bookingComfMessLab");
		outReserPeriodLc.add(outReserPeriodLab, new ColumnData(100));

		outReserPeriodCombox = new EasyClearCombobox<OutReservedModelData>();
		outReserPeriodCombox.setDisplayField(CoreConstants.FULLTNAME);
		outReserPeriodCombox.setTriggerAction(TriggerAction.ALL);
		outReserPeriodCombox.setForceSelection(true);
		outReserPeriodStore = new ListStore<OutReservedModelData>();
		for (OutReserEnum cm : OutReserEnum.values()) {
			outReserPeriodStore.add(new OutReservedModelData(cm));
		}
		outReserPeriodCombox.setId("RestaurantConfigPanel_outReserPeriodCombox");
		outReserPeriodCombox.setStore(outReserPeriodStore);
		outReserPeriodLc.add(outReserPeriodCombox, new ColumnData(200));
		outReserPeriodCombox
				.addSelectionChangedListener(new SelectionChangedListener<OutReservedModelData>() {

					@Override
					public void selectionChanged(SelectionChangedEvent<OutReservedModelData> se) {
						if (outReserPeriodCombox.getValue() != null) {
							outReserArea.setValue(((outReserArea.getValue() == null) ? ""
									: outReserArea.getValue())
									+ "<[<"
									+ outReserPeriodCombox.getValue().getEnum().getDisplayStr() + ">]>");
						}
					}
				});


		outReserLc = new LayoutContainer();
		outReserLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		outReserLc.setLayout(new ColumnLayout());
		fieldSet1.add(outReserLc);

		Label outReserLab = new Label(CoreConstants.CORE_CONSTANTS.details() + CServiceConstants.FIELD_SEP);
		outReserLab.setId("RestaurantConfigPanel_reqPopupLab");
		outReserLc.add(outReserLab, new ColumnData(100));

		outReserArea = new TextArea();
		outReserArea.setAllowBlank(false);
		outReserArea.setId("RestaurantConfigPanel_reqPopupArea");
		outReserArea.setSize(550, 50);
		outReserLc.add(outReserArea);
	}

	public void expectedDeliveryFieldSet() {
		fieldSet2 = new FieldSet();
		fieldSet2.setBorders(true);
		fieldSet2.setId("RestaurantConfigPanel_fieldSet2");
		fieldSet2.setHeading(CServiceConstants.CSERVICE_CONSTANTS.expDelivery()
				+ CoreConstants.REQURIED_FIELD_LABEL);
		add(fieldSet2);
		
		expDeliveryTimeLc = new LayoutContainer();
		expDeliveryTimeLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		expDeliveryTimeLc.setLayout(new ColumnLayout());
		fieldSet2.add(expDeliveryTimeLc);

		Label expDeliveryTimeLab = new Label(CServiceConstants.CSERVICE_CONSTANTS.messageField()
				+ CServiceConstants.FIELD_SEP);
		expDeliveryTimeLab.setId("RestaurantConfigPanel_expDeliveryTimeLab");
		expDeliveryTimeLc.add(expDeliveryTimeLab, new ColumnData(100));

		expDeliveryTimeCombox = new EasyClearCombobox<OutReservedModelData>();
		expDeliveryTimeCombox.setDisplayField(CoreConstants.FULLTNAME);
		expDeliveryTimeCombox.setTriggerAction(TriggerAction.ALL);
		expDeliveryTimeCombox.setForceSelection(true);
		outReserPeriodStore = new ListStore<OutReservedModelData>();
		for (OutReserEnum cm : OutReserEnum.values()) {
			outReserPeriodStore.add(new OutReservedModelData(cm));
		}
		expDeliveryTimeCombox.setId("RestaurantConfigPanel_fieldSet2");
		expDeliveryTimeCombox.setStore(outReserPeriodStore);
		expDeliveryTimeLc.add(expDeliveryTimeCombox, new ColumnData(200));
		expDeliveryTimeCombox
				.addSelectionChangedListener(new SelectionChangedListener<OutReservedModelData>() {

					@Override
					public void selectionChanged(SelectionChangedEvent<OutReservedModelData> se) {
						if (expDeliveryTimeCombox.getValue() != null) {
							expDeliveryArea.setValue(((expDeliveryArea.getValue() == null) ? ""
									: expDeliveryArea.getValue())
									+ "<[<"
									+ expDeliveryTimeCombox.getValue().getEnum().getDisplayStr() + ">]>");
						}
					}
				});


		expDeliveryLc = new LayoutContainer();
		expDeliveryLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		expDeliveryLc.setLayout(new ColumnLayout());
		fieldSet2.add(expDeliveryLc);

		Label expDeliveryLab = new Label(CoreConstants.CORE_CONSTANTS.details() + CServiceConstants.FIELD_SEP);
		expDeliveryLab.setId("RestaurantConfigPanel_reqPopupLab");
		expDeliveryLc.add(expDeliveryLab, new ColumnData(100));

		expDeliveryArea = new TextArea();
		expDeliveryArea.setAllowBlank(false);
		expDeliveryArea.setId("RestaurantConfigPanel_reqPopupArea");
		expDeliveryArea.setSize(550, 50);
		expDeliveryLc.add(expDeliveryArea);
	}

	public void deliveryDateTimeForItemFieldSet() {
		fieldSet3 = new FieldSet();
		fieldSet3.setBorders(true);
		fieldSet3.setId("RestaurantConfigPanel_fieldSet3");
		fieldSet3.setHeading(CServiceConstants.CSERVICE_CONSTANTS.nonValidDelivery()
				+ CoreConstants.REQURIED_FIELD_LABEL);
		add(fieldSet3);
		
		commonLc = new LayoutContainer();
		commonLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		commonLc.setLayout(new ColumnLayout());
		fieldSet3.add(commonLc);

		Label commonLab = new Label(CServiceConstants.CSERVICE_CONSTANTS.messageField()
				+ CServiceConstants.FIELD_SEP);
		commonLab.setId("RestaurantConfigPanel_commonLab");
		commonLc.add(commonLab, new ColumnData(100));

		commonCombox = new EasyClearCombobox<CommonReqeustModelData>();
		commonCombox.setDisplayField(CoreConstants.FULLTNAME);
		commonCombox.setTriggerAction(TriggerAction.ALL);
		commonStore = new ListStore<CommonReqeustModelData>();
		for (CommonReqeustConfigEnum cm : CommonReqeustConfigEnum.values()) {
			commonStore.add(new CommonReqeustModelData(cm));
		}
		commonCombox.setId("RestaurantConfigPanel_fieldSet3");
		commonCombox.setStore(commonStore);
		commonLc.add(commonCombox, new ColumnData(200));
		commonCombox
				.addSelectionChangedListener(new SelectionChangedListener<CommonReqeustModelData>() {

					@Override
					public void selectionChanged(SelectionChangedEvent<CommonReqeustModelData> se) {
						if (commonCombox.getValue() != null) {
							nonValidDeliveryArea.setValue(((nonValidDeliveryArea.getValue() == null) ? ""
									: nonValidDeliveryArea.getValue())
									+ "<[<"
									+ commonCombox.getValue().getEnum().getDisplayStr() + ">]>");
						}
					}
				});
		
		//TODO
		itemLc = new LayoutContainer();
		itemLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		itemLc.setLayout(new ColumnLayout());
		fieldSet3.add(itemLc);

		Label itemLab = new Label(CServiceConstants.CSERVICE_CONSTANTS.itemConfig()
				+ CServiceConstants.FIELD_SEP);
		itemLab.setId("RestaurantConfigPanel_itemLab");
		itemLc.add(itemLab, new ColumnData(100));

		itemCombox = new EasyClearCombobox<ItemComboxModelData>();
		itemCombox.setDisplayField(CoreConstants.FULLTNAME);
		itemCombox.setTriggerAction(TriggerAction.ALL);
		itemStore = new ListStore<ItemComboxModelData>();
		for (ItemComboxConfigEnum cm : ItemComboxConfigEnum.values()) {
			itemStore.add(new ItemComboxModelData(cm));
		}
		itemCombox.setId("RestaurantConfigPanel_fieldSet3");
		itemCombox.setStore(itemStore);
		itemLc.add(itemCombox, new ColumnData(200));
		itemCombox.addSelectionChangedListener(new SelectionChangedListener<ItemComboxModelData>() {

					@Override
					public void selectionChanged(SelectionChangedEvent<ItemComboxModelData> se) {
						if (itemCombox.getValue() != null) {
							nonValidDeliveryArea.setValue(((nonValidDeliveryArea.getValue() == null) ? ""
									: nonValidDeliveryArea.getValue())
									+ "<[<"
									+ itemCombox.getValue().getEnum().getDisplayStr() + ">]>");
						}
					}
				});

		//TODO
		cookOptionLc = new LayoutContainer();
		cookOptionLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		cookOptionLc.setLayout(new ColumnLayout());
		fieldSet3.add(cookOptionLc);

		Label cookOptionLab = new Label(CServiceConstants.CSERVICE_CONSTANTS.cookOption()
				+ CServiceConstants.FIELD_SEP);
		cookOptionLab.setId("RestaurantConfigPanel_itemLab");
		cookOptionLc.add(cookOptionLab, new ColumnData(100));

		cookOptionCombox = new EasyClearCombobox<CookOptionConfigModelData>();
		cookOptionCombox.setDisplayField(CoreConstants.FULLTNAME);
		cookOptionCombox.setTriggerAction(TriggerAction.ALL);
		cookStore = new ListStore<CookOptionConfigModelData>();
		for (CookOptionConfigEnum cm : CookOptionConfigEnum.values()) {
			cookStore.add(new CookOptionConfigModelData(cm));
		}
		cookOptionCombox.setId("RestaurantConfigPanel_fieldSet3");
		cookOptionCombox.setStore(cookStore);
		cookOptionLc.add(cookOptionCombox, new ColumnData(200));
		cookOptionCombox.addSelectionChangedListener(new SelectionChangedListener<CookOptionConfigModelData>() {

					@Override
					public void selectionChanged(SelectionChangedEvent<CookOptionConfigModelData> se) {
						if (cookOptionCombox.getValue() != null) {
							nonValidDeliveryArea.setValue(((nonValidDeliveryArea.getValue() == null) ? ""
									: nonValidDeliveryArea.getValue())
									+ "<[<"
									+ cookOptionCombox.getValue().getEnum().getDisplayStr() + ">]>");
						}
					}
				});
		
		chargeTypeLc = new LayoutContainer();
		chargeTypeLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		chargeTypeLc.setLayout(new ColumnLayout());
		fieldSet3.add(chargeTypeLc);

		Label chargeTypeLab = new Label(CServiceConstants.CSERVICE_CONSTANTS.chargeType()
				+ CServiceConstants.FIELD_SEP);
		chargeTypeLab.setId("RestaurantConfigPanel_itemLab");
		chargeTypeLc.add(chargeTypeLab, new ColumnData(100));

		chargeTypeCombox = new EasyClearCombobox<ChargeTypeConfigModelData>();
		chargeTypeCombox.setDisplayField(CoreConstants.FULLTNAME);
		chargeTypeCombox.setTriggerAction(TriggerAction.ALL);
		chargeTypeStore = new ListStore<ChargeTypeConfigModelData>();
		for (ChargeTypeConfigEnum cm : ChargeTypeConfigEnum.values()) {
			chargeTypeStore.add(new ChargeTypeConfigModelData(cm));
		}
		chargeTypeCombox.setId("RestaurantConfigPanel_fieldSet3");
		chargeTypeCombox.setStore(chargeTypeStore);
		chargeTypeLc.add(chargeTypeCombox, new ColumnData(200));
		chargeTypeCombox.addSelectionChangedListener(new SelectionChangedListener<ChargeTypeConfigModelData>() {

					@Override
					public void selectionChanged(SelectionChangedEvent<ChargeTypeConfigModelData> se) {
						if (chargeTypeCombox.getValue() != null) {
							nonValidDeliveryArea.setValue(((nonValidDeliveryArea.getValue() == null) ? ""
									: nonValidDeliveryArea.getValue())
									+ "<[<"
									+ chargeTypeCombox.getValue().getEnum().getDisplayStr() + ">]>");
						}
					}
				});
		
		
		
		nonValidDeliveryLc = new LayoutContainer();
		nonValidDeliveryLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		nonValidDeliveryLc.setLayout(new ColumnLayout());
		fieldSet3.add(nonValidDeliveryLc);

		Label nonValidDeliveryLab = new Label(CoreConstants.CORE_CONSTANTS.details() + CServiceConstants.FIELD_SEP);
		nonValidDeliveryLab.setId("RestaurantConfigPanel_reqPopupLab");
		nonValidDeliveryLc.add(	nonValidDeliveryLab, new ColumnData(100));

		nonValidDeliveryArea = new TextArea();
		nonValidDeliveryArea.setAllowBlank(false);
		nonValidDeliveryArea.setId("RestaurantConfigPanel_nonValidDelivery");
		nonValidDeliveryArea.setSize(550, 50);
		nonValidDeliveryLc.add(nonValidDeliveryArea);	
	}

	public void requestTimeoutFieldSet() {
		fieldSet5 = new FieldSet();
		fieldSet5.setBorders(true);
		fieldSet5.setId("RestaurantConfigPanel_fieldSet5");
		fieldSet5.setHeading(CServiceConstants.CSERVICE_CONSTANTS.inRoomRequestTimeout()
				+ CoreConstants.REQURIED_FIELD_LABEL);
		add(fieldSet5);
		
		commonLc = new LayoutContainer();
		commonLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		commonLc.setLayout(new ColumnLayout());
		fieldSet5.add(commonLc);

		Label commonLab = new Label(CServiceConstants.CSERVICE_CONSTANTS.messageField()
				+ CServiceConstants.FIELD_SEP);
		commonLab.setId("RestaurantConfigPanel_commonLab");
		commonLc.add(commonLab, new ColumnData(100));

		commonCombox = new EasyClearCombobox<CommonReqeustModelData>();
		commonCombox.setDisplayField(CoreConstants.FULLTNAME);
		commonCombox.setTriggerAction(TriggerAction.ALL);
		commonStore = new ListStore<CommonReqeustModelData>();
		for (CommonReqeustConfigEnum cm : CommonReqeustConfigEnum.values()) {
			commonStore.add(new CommonReqeustModelData(cm));
		}
		commonCombox.setId("RestaurantConfigPanel_fieldSet3");
		commonCombox.setStore(commonStore);
		commonLc.add(commonCombox, new ColumnData(200));
		commonCombox
				.addSelectionChangedListener(new SelectionChangedListener<CommonReqeustModelData>() {

					@Override
					public void selectionChanged(SelectionChangedEvent<CommonReqeustModelData> se) {
						if (commonCombox.getValue() != null) {
							inRoomRequestTimeoutLcArea.setValue(((inRoomRequestTimeoutLcArea.getValue() == null) ? ""
									: inRoomRequestTimeoutLcArea.getValue())
									+ "<[<"
									+ commonCombox.getValue().getEnum().getDisplayStr() + ">]>");
						}
					}
				});
		
		//TODO
		itemLc = new LayoutContainer();
		itemLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		itemLc.setLayout(new ColumnLayout());
		fieldSet5.add(itemLc);

		Label itemLab = new Label(CServiceConstants.CSERVICE_CONSTANTS.itemConfig()
				+ CServiceConstants.FIELD_SEP);
		itemLab.setId("RestaurantConfigPanel_itemLab");
		itemLc.add(itemLab, new ColumnData(100));

		itemCombox = new EasyClearCombobox<ItemComboxModelData>();
		itemCombox.setDisplayField(CoreConstants.FULLTNAME);
		itemCombox.setTriggerAction(TriggerAction.ALL);
		itemStore = new ListStore<ItemComboxModelData>();
		for (ItemComboxConfigEnum cm : ItemComboxConfigEnum.values()) {
			itemStore.add(new ItemComboxModelData(cm));
		}
		itemCombox.setId("RestaurantConfigPanel_fieldSet3");
		itemCombox.setStore(itemStore);
		itemLc.add(itemCombox, new ColumnData(200));
		itemCombox.addSelectionChangedListener(new SelectionChangedListener<ItemComboxModelData>() {

					@Override
					public void selectionChanged(SelectionChangedEvent<ItemComboxModelData> se) {
						if (itemCombox.getValue() != null) {
							inRoomRequestTimeoutLcArea.setValue(((inRoomRequestTimeoutLcArea.getValue() == null) ? ""
									: inRoomRequestTimeoutLcArea.getValue())
									+ "<[<"
									+ itemCombox.getValue().getEnum().getDisplayStr() + ">]>");
						}
					}
				});

		//TODO
		cookOptionLc = new LayoutContainer();
		cookOptionLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		cookOptionLc.setLayout(new ColumnLayout());
		fieldSet5.add(cookOptionLc);

		Label cookOptionLab = new Label(CServiceConstants.CSERVICE_CONSTANTS.cookOption()
				+ CServiceConstants.FIELD_SEP);
		cookOptionLab.setId("RestaurantConfigPanel_itemLab");
		cookOptionLc.add(cookOptionLab, new ColumnData(100));

		cookOptionCombox = new EasyClearCombobox<CookOptionConfigModelData>();
		cookOptionCombox.setDisplayField(CoreConstants.FULLTNAME);
		cookOptionCombox.setTriggerAction(TriggerAction.ALL);
		cookStore = new ListStore<CookOptionConfigModelData>();
		for (CookOptionConfigEnum cm : CookOptionConfigEnum.values()) {
			cookStore.add(new CookOptionConfigModelData(cm));
		}
		cookOptionCombox.setId("RestaurantConfigPanel_fieldSet3");
		cookOptionCombox.setStore(cookStore);
		cookOptionLc.add(cookOptionCombox, new ColumnData(200));
		cookOptionCombox.addSelectionChangedListener(new SelectionChangedListener<CookOptionConfigModelData>() {

					@Override
					public void selectionChanged(SelectionChangedEvent<CookOptionConfigModelData> se) {
						if (cookOptionCombox.getValue() != null) {
							inRoomRequestTimeoutLcArea.setValue(((inRoomRequestTimeoutLcArea.getValue() == null) ? ""
									: inRoomRequestTimeoutLcArea.getValue())
									+ "<[<"
									+ cookOptionCombox.getValue().getEnum().getDisplayStr() + ">]>");
						}
					}
				});
		
		chargeTypeLc = new LayoutContainer();
		chargeTypeLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		chargeTypeLc.setLayout(new ColumnLayout());
		fieldSet5.add(chargeTypeLc);

		Label chargeTypeLab = new Label(CServiceConstants.CSERVICE_CONSTANTS.chargeType()
				+ CServiceConstants.FIELD_SEP);
		chargeTypeLab.setId("RestaurantConfigPanel_itemLab");
		chargeTypeLc.add(chargeTypeLab, new ColumnData(100));

		chargeTypeCombox = new EasyClearCombobox<ChargeTypeConfigModelData>();
		chargeTypeCombox.setDisplayField(CoreConstants.FULLTNAME);
		chargeTypeCombox.setTriggerAction(TriggerAction.ALL);
		chargeTypeStore = new ListStore<ChargeTypeConfigModelData>();
		for (ChargeTypeConfigEnum cm : ChargeTypeConfigEnum.values()) {
			chargeTypeStore.add(new ChargeTypeConfigModelData(cm));
		}
		chargeTypeCombox.setId("RestaurantConfigPanel_fieldSet3");
		chargeTypeCombox.setStore(chargeTypeStore);
		chargeTypeLc.add(chargeTypeCombox, new ColumnData(200));
		chargeTypeCombox.addSelectionChangedListener(new SelectionChangedListener<ChargeTypeConfigModelData>() {

					@Override
					public void selectionChanged(SelectionChangedEvent<ChargeTypeConfigModelData> se) {
						if (chargeTypeCombox.getValue() != null) {
							inRoomRequestTimeoutLcArea.setValue(((inRoomRequestTimeoutLcArea.getValue() == null) ? ""
									: inRoomRequestTimeoutLcArea.getValue())
									+ "<[<"
									+ chargeTypeCombox.getValue().getEnum().getDisplayStr() + ">]>");
						}
					}
				});
		

		inRoomRequestTimeoutLc = new LayoutContainer();
		inRoomRequestTimeoutLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		inRoomRequestTimeoutLc.setLayout(new ColumnLayout());
		fieldSet5.add(inRoomRequestTimeoutLc);

		Label inRoomRequestTimeoutLab = new Label(CoreConstants.CORE_CONSTANTS.details() + CServiceConstants.FIELD_SEP);
		inRoomRequestTimeoutLab.setId("RestaurantConfigPanel_inRoomRequestTimeoutLab");
		inRoomRequestTimeoutLc.add(inRoomRequestTimeoutLab, new ColumnData(100));

		inRoomRequestTimeoutLcArea = new TextArea();
		inRoomRequestTimeoutLcArea.setAllowBlank(false);
		inRoomRequestTimeoutLcArea.setId("RestaurantConfigPanel_inRoomRequestTimeoutLcArea");
		inRoomRequestTimeoutLcArea.setSize(550, 50);
		inRoomRequestTimeoutLc.add(inRoomRequestTimeoutLcArea);
	}

	public void requestMessageFieldSet() {
		fieldSet6 = new FieldSet();
		fieldSet6.setBorders(true);
		fieldSet6.setId("RestaurantConfigPanel_fieldSet6");
		fieldSet6.setHeading(CServiceConstants.CSERVICE_CONSTANTS.inRoomRequestTimeoutTemp()
				+ CoreConstants.REQURIED_FIELD_LABEL);
		add(fieldSet6);
		
		bookingTileFieldLc = new LayoutContainer();
		bookingTileFieldLc.setLayout(new ColumnLayout());
		fieldSet6.add(bookingTileFieldLc);

		Label bookingTitleMesLab = new Label(CServiceConstants.CSERVICE_CONSTANTS.messageField()
				+ CServiceConstants.FIELD_SEP);
		bookingTitleMesLab.setId("RestaurantConfigPanel_bookingTitleMesLab");
		bookingTileFieldLc.add(bookingTitleMesLab, new ColumnData(100));

		bookingTitleMesCombox = new EasyClearCombobox<BookingConfirmTitleGWTEnumModelData>();

		bookingTitleMesCombox.setDisplayField(CoreConstants.FULLTNAME);
		bookingTitleMesCombox.setTriggerAction(TriggerAction.ALL);
		bookingTitleMesCombox.setForceSelection(true);
		bookingTitleMesStore = new ListStore<BookingConfirmTitleGWTEnumModelData>();
		for (BookingConfirmTitleGWTEnum cm : BookingConfirmTitleGWTEnum.values()) {
			bookingTitleMesStore.add(new BookingConfirmTitleGWTEnumModelData(cm));
		}
		bookingTitleMesCombox.setId("RestaurantConfigPanel_bookingTitleMesCombox");
		bookingTitleMesCombox.setStore(bookingTitleMesStore);
		bookingTileFieldLc.add(bookingTitleMesCombox, new ColumnData(200));
		bookingTitleMesCombox
				.addSelectionChangedListener(new SelectionChangedListener<BookingConfirmTitleGWTEnumModelData>() {

					@Override
					public void selectionChanged(SelectionChangedEvent<BookingConfirmTitleGWTEnumModelData> se) {
						if (bookingTitleMesCombox.getValue() != null) {
							bookingTitleField.setValue(((bookingTitleField.getValue() == null) ? ""
									: bookingTitleField.getValue())
									+ "<[<"
									+ bookingTitleMesCombox.getValue().getEnum().getDisplayStr() + ">]>");
						}
					}
				});

		bookingTitleLc = new LayoutContainer();
		bookingTitleLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		bookingTitleLc.setLayout(new ColumnLayout());
		fieldSet6.add(bookingTitleLc);

		Label bookingTitleLab = new Label(ShareGWTConstants.SHARE_GWT_CONSTANTS.title()
				+ CServiceConstants.FIELD_SEP);
		bookingTitleLab.setId("RestaurantConfigPanel_bookingTitleLab");
		bookingTitleLc.add(bookingTitleLab, new ColumnData(100));

		bookingTitleField = new TextField<String>();
		bookingTitleField.setAllowBlank(false);
		bookingTitleField.setId("RestaurantConfigPanel_bookingTitleField");
		bookingTitleLc.add(bookingTitleField, new ColumnData(200));

		
		
		reserLc = new LayoutContainer();
		reserLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		reserLc.setLayout(new ColumnLayout());
		fieldSet6.add(reserLc);

		Label reserLab = new Label(CServiceConstants.CSERVICE_CONSTANTS.messageField()
				+ CServiceConstants.FIELD_SEP);
		reserLab.setId("RestaurantConfigPanel_reserLab");
		reserLc.add(reserLab, new ColumnData(100));

		reserCombox = new EasyClearCombobox<ReservRckModelData>();
		reserCombox.setDisplayField(CoreConstants.FULLTNAME);
		reserCombox.setTriggerAction(TriggerAction.ALL);
		reserCombox.setForceSelection(true);
		reserStore = new ListStore<ReservRckModelData>();
		for (ReservRckEnum cm : ReservRckEnum.values()) {
			reserStore.add(new ReservRckModelData(cm));
		}
		reserCombox.setId("RestaurantConfigPanel_fieldSet2");
		reserCombox.setStore(reserStore);
		reserLc.add(reserCombox, new ColumnData(200));
		reserCombox.addSelectionChangedListener(new SelectionChangedListener<ReservRckModelData>() {

			@Override
			public void selectionChanged(SelectionChangedEvent<ReservRckModelData> se) {
				if (reserCombox.getValue() != null) {
					inRoomRequestTimeoutTempArea.setValue(((inRoomRequestTimeoutTempArea.getValue() == null) ? ""
							: inRoomRequestTimeoutTempArea.getValue())
							+ "<[<"
							+ reserCombox.getValue().getEnum().getDisplayStr() + ">]>");
				}
			}
		});
		
		
		
		inRoomRequestTimeoutTempLc = new LayoutContainer();
		inRoomRequestTimeoutTempLc.setStyleAttribute(CServiceConstants.CSS_MARGINTOP, "5px");
		inRoomRequestTimeoutTempLc.setLayout(new ColumnLayout());
		fieldSet6.add(inRoomRequestTimeoutTempLc);

		Label inRoomRequestTimeoutTempLab = new Label(CoreConstants.CORE_CONSTANTS.details() + CServiceConstants.FIELD_SEP);
		inRoomRequestTimeoutTempLab.setId("RestaurantConfigPanel_inRoomRequestTimeoutTempLab");
		inRoomRequestTimeoutTempLc.add(inRoomRequestTimeoutTempLab, new ColumnData(100));

		inRoomRequestTimeoutTempArea = new TextArea();
		inRoomRequestTimeoutTempArea.setAllowBlank(false);
		inRoomRequestTimeoutTempArea.setId("RestaurantConfigPanel_inRoomRequestTimeoutTempArea");
		inRoomRequestTimeoutTempArea.setSize(550, 50);
		inRoomRequestTimeoutTempLc.add(	inRoomRequestTimeoutTempArea);	
	}
}
